import request from '@/utils/request'

/**
 * 获取用户名登录
 * @param {*} data 账户名 密码
 * @returns
 */
export const getUserAccountAPI = (data) => {
  return request({
    url: '/login',
    method: 'POST',
    data
  })
}

/**
 * 获取短信验证码
 */
export const getUserCodeAPI = (mobile) => {
  return request({
    url: '/login/code',

    params: {
      mobile
    }
  })
}

/**
 *获取手机号验证码登录
 * @param {*} params 手机号，验证码
 * @returns
 */
export const getUserCodeLoginAPI = (params) => {
  return request({
    url: '/login/code',
    method: 'POST',
    params
  })
}
